home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 6 / Amiga Format AFCD06 (Nov 1996, Issue 90).iso / serious / commercial / fwpatch / install finalwriter-030 < prev    next >
Text File  |  1996-08-22  |  2KB  |  81 lines

  1. ; $VER: FinalWriter-030_Install 1.17 (22.8.96)
  2.  
  3. (set version "5.0")
  4.  
  5. (onerror (exit (quiet)))
  6.  
  7. (message
  8.     "\n\nFinalWriter " version " '030"
  9.     "\nCopyright 1995-96 Martin Berndt"
  10.     "\n\n\n!!! This Patch is SHAREWARE !!!"
  11.     "\n\nPlease read the \"ReadMe.txt\" file."
  12. )
  13.  
  14. (set @default-dest
  15.     (askdir
  16.         (prompt "Where is your FinalWriter Drawer?")
  17.         (help @askfile-help)
  18.         (default "SYS:FinalWriter")
  19.         (newpath)
  20.     )
  21. )
  22.  
  23. (set language
  24.     (askchoice
  25.         (prompt "Select your version")
  26.         (help @askchoice-help)
  27.         (choices "US1   7-Jun-96 (American English)"
  28.              "US2  28-Jun-96 (American English)"
  29.              "US3   8-Jul-96 (American English)"
  30.              "GER1  3-Aug-96 (German)")
  31.     )
  32. )
  33.  
  34. (set backup
  35.     (askoptions
  36.         (prompt "Options")
  37.         (help @askoptions-help)
  38.         (choices "Create Backup Files")
  39.     )
  40. )
  41.  
  42. (set n 0)
  43. (set percent 0)
  44.  
  45. (while (set name (select n "FinalWriter" "swpost.library" "swshell.library"
  46.                "cachemap.library" "qfont.library" "")) (
  47.     (set n (+ n 1))
  48.     (complete percent)
  49.     (if (= n 1)
  50.         (set file name)
  51.         (set file ("FWLibs/%s" name))
  52.     )
  53.     (set newfile (tackon @default-dest file))
  54.     (set oldfile (cat newfile ".bak"))
  55.     (if (= (exists newfile) 0)
  56.         (abort name " not found!")
  57.     )
  58.     (rename newfile oldfile)
  59.     (if (< n 4) (
  60.                 (if (= n 1) (
  61.                         (set name (cat name (select language "US1" "US2" "US3" "GER1")))
  62.                 ))
  63.         (working "\n\nPatching\n" newfile)
  64.         (if (<> (run ("spatch \"-o%s\" \"-p%s.pch\" \"%s\"" newfile name oldfile)) 0) (
  65.             (rename oldfile newfile)
  66.             (abort "Wrong Version!")
  67.         ))
  68.         (set percent (+ percent 30))
  69.     ) (
  70.         (copyfiles
  71.             (prompt "Copying " name)
  72.             (help @copyfiles-help)
  73.             (source name)
  74.             (dest (tackon @default-dest "FWLibs"))
  75.             (optional "force" "askuser")
  76.         )
  77.         (set percent (+ percent 5))
  78.     ))
  79.     (if (= backup 0) (delete oldfile))
  80. ))
  81.